<template>
  <app-page>
    <div class="home">
      <SchemeList />
      <TableList />
      <Order />
    </div>
  </app-page>
</template>

<script setup>
import SchemeList from "./SchemeList.vue";
import TableList from "./TableList.vue";
import Order from "./Order.vue";

import { useHomeStore } from './home-store.js'
const userStore = useUserStore()
const platformObj = reactive({})
const platforms = ref([])
const store = useHomeStore()

provide('Home', {
  store,
  state: store.state,
})

onMounted(() => {
  
  platforms.value = userStore.user.subscribe[`${userStore.user.plant_code}:data_api`].selected.map(item => {
    platformObj[item.value] = item
    return { value: item.value, label: item.name }
  })
  store.state.permissionBctypes = platforms.value
  
})
</script>

<style lang="scss" scoped>
.home{
  display: flex;
  width: 100%;
  height: 100%;
}
</style>
